const { Menu } = require('electron')

export function topMenu(menuTemplate = [
    {
        label: "菜单",
        submenu: [{
            label: '功能1',
            click: () => console.log(1111111111)
        }]
    }
]) {


    const menuBuilder = Menu.buildFromTemplate(menuTemplate)

    Menu.setApplicationMenu(menuBuilder)
}